package phoenix.core.data_models;

import phoenix.core.PhoenixManager;
import phoenix.core.base.extensions.DataModelBaseExt;

/**
 * Class provides access to user profile data
 */
public class UserProfileDataModel extends DataModelBaseExt
{

	public UserProfileDataModel(PhoenixManager p_phoenix)
	{
		super(p_phoenix);
	}

	public class LookingFor
	{
		public String ageFrom;
		public String ageTo;
		public String location;
		public String distance;
		public String gender;
		public String status;
		public String lastName;
		public String description;
		public String profession;

		public String getAgeFrom()
		{
			return ageFrom;
		}

		public void setAgeFrom(String ageFrom)
		{
			this.ageFrom = ageFrom;
		}

		public String getProfession()
		{
			return profession;
		}

		public void setProfession(String profession)
		{
			this.profession = profession;
		}

		public String getDescription()
		{
			return description;
		}

		public void setDescription(String description)
		{
			this.description = description;
		}

		public String getLastName()
		{
			return lastName;
		}

		public void setLastName(String lastName)
		{
			this.lastName = lastName;
		}

		public String getStatus()
		{
			return status;
		}

		public void setStatus(String status)
		{
			this.status = status;
		}

		public String getGender()
		{
			return gender;
		}

		public void setGender(String gender)
		{
			this.gender = gender;
		}

		public String getDistance()
		{
			return distance;
		}

		public void setDistance(String distance)
		{
			this.distance = distance;
		}

		public String getLocation()
		{
			return location;
		}

		public void setLocation(String location)
		{
			this.location = location;
		}

		public String getAgeTo()
		{
			return ageTo;
		}

		public void setAgeTo(String ageTo)
		{
			this.ageTo = ageTo;
		}

		public LookingFor(String p_gender)
		{
			ageFrom = "";
			ageTo = "";
			location = "";
			distance = "";
			gender = (p_gender.toLowerCase().equals("male")) ? "female" : "male";
			status = "";
			description = "";
		}

		public LookingFor(String p_gender, String p_location)
		{
			ageFrom = "";
			ageTo = "";
			location = p_location;
			distance = "";
			gender = (p_gender.toLowerCase().equals("male")) ? "female" : "male";
			status = "";
			description = "";
		}

		public void fillUpForFunnel(String p_gender, String p_location)
		{
			ageFrom = "18";
			ageTo = "25";
			location = p_location;
			distance = "20";
			description = "Funnel status will be here ;)";
			gender = (p_gender.toLowerCase().equals("male")) ? "female" : "male";
		}

		public void fillUpForFunnelTwo(String p_location)
		{
			ageFrom = "25";
			ageTo = "35";
			location = p_location;
			distance = "50";
			status = "some status here";
			description = "something about here!)";
		}

		public void fillUpForFunnelThree(String p_location)
		{
			ageFrom = "18";
			ageTo = "50";
			location = p_location;
			distance = "20";
			status = "some status here";
			description = "something about here!)";
		}

		public void fillUpForMyProfile(String p_gender)
		{
			gender = (p_gender.toLowerCase().equals("male")) ? "male" : "female";
			ageFrom = "30";
			ageTo = "40";
			location = "Oxford, OX1 1AB";
			distance = "50";
		}

		public void fillUpForMyProfileMobile(String p_location)
		{
			ageFrom = "18";
			ageTo = "36";
			location = p_location;
			lastName = "Rupert";
			profession = "Doctor";
			status = "Hello world";
			description = "Hello there";
		}

		public void fillUpLocation(String p_location)
		{
			ageFrom = "18";
			ageTo = "36";
			location = p_location;
			lastName = "Rupert";
			profession = "Doctor";
			status = "Hello world";
			description = "Hello there";
		}

		public void fillLookingFor(String p_ageFrom, String p_ageTo, String p_location, String p_distance, String p_status, String p_description,
			String p_gender)
		{
			ageFrom = p_ageFrom;
			ageTo = p_ageTo;
			location = p_location;
			distance = p_distance;
			status = p_status;
			description = p_description;
			gender = p_gender;
		}
	}

	public class ProfileDetails
	{
		// Main info
		public String age;
		public String birthDay;
		public String birthMonth;
		public String birthYear;
		public String location;
		public String description;
		public String about;

		// Personal info
		public String height;
		public String weight;
		public String bodyType;
		public String hairColor;
		public String eyesColor;
		public String pircing;
		public String tattoo;
		public String orientation;
		public String maritalStatus;
		public String children;
		public String living;
		public String income;
		public String smoke;
		public String drink;
		public String ethnicOrigin;
		public String religion;
		public String education;
		public String nativeLanguage;
		public String hobbiesAndInterests;
		public String language;

		public String getAge()
		{
			return age;
		}

		public void setAge(String age)
		{
			this.age = age;
		}

		public String getBirthDay()
		{
			return birthDay;
		}

		public void setBirthDay(String birthDay)
		{
			this.birthDay = birthDay;
		}

		public String getBirthMonth()
		{
			return birthMonth;
		}

		public void setBirthMonth(String birthMonth)
		{
			this.birthMonth = birthMonth;
		}

		public String getBirthYear()
		{
			return birthYear;
		}

		public void setBirthYear(String birthYear)
		{
			this.birthYear = birthYear;
		}

		public String getLocation()
		{
			return location;
		}

		public void setLocation(String location)
		{
			this.location = location;
		}

		public String getDescription()
		{
			return description;
		}

		public void setDescription(String description)
		{
			this.description = description;
		}

		public String getAbout()
		{
			return about;
		}

		public void setAbout(String about)
		{
			this.about = about;
		}

		public String getHeight()
		{
			return height;
		}

		public void setHeight(String height)
		{
			this.height = height;
		}

		public String getWeight()
		{
			return weight;
		}

		public void setWeight(String weight)
		{
			this.weight = weight;
		}

		public String getBodyType()
		{
			return bodyType;
		}

		public void setBodyType(String bodyType)
		{
			this.bodyType = bodyType;
		}

		public String getHairColor()
		{
			return hairColor;
		}

		public void setHairColor(String hairColor)
		{
			this.hairColor = hairColor;
		}

		public String getEyesColor()
		{
			return eyesColor;
		}

		public void setEyesColor(String eyesColor)
		{
			this.eyesColor = eyesColor;
		}

		public String getPircing()
		{
			return pircing;
		}

		public void setPircing(String pircing)
		{
			this.pircing = pircing;
		}

		public String getTattoo()
		{
			return tattoo;
		}

		public void setTattoo(String tattoo)
		{
			this.tattoo = tattoo;
		}

		public String getOrientation()
		{
			return orientation;
		}

		public void setOrientation(String orientation)
		{
			this.orientation = orientation;
		}

		public String getMaritalStatus()
		{
			return maritalStatus;
		}

		public void setMaritalStatus(String maritalStatus)
		{
			this.maritalStatus = maritalStatus;
		}

		public String getChildren()
		{
			return children;
		}

		public void setChildren(String children)
		{
			this.children = children;
		}

		public String getLiving()
		{
			return living;
		}

		public void setLiving(String living)
		{
			this.living = living;
		}

		public String getIncome()
		{
			return income;
		}

		public void setIncome(String income)
		{
			this.income = income;
		}

		public String getSmoke()
		{
			return smoke;
		}

		public void setSmoke(String smoke)
		{
			this.smoke = smoke;
		}

		public String getDrink()
		{
			return drink;
		}

		public void setDrink(String drink)
		{
			this.drink = drink;
		}

		public String getEthnicOrigin()
		{
			return ethnicOrigin;
		}

		public void setEthnicOrigin(String ethnicOrigin)
		{
			this.ethnicOrigin = ethnicOrigin;
		}

		public String getReligion()
		{
			return religion;
		}

		public void setReligion(String religion)
		{
			this.religion = religion;
		}

		public String getEducation()
		{
			return education;
		}

		public void setEducation(String education)
		{
			this.education = education;
		}

		public String getNativeLanguage()
		{
			return nativeLanguage;
		}

		public void setNativeLanguage(String nativeLanguage)
		{
			this.nativeLanguage = nativeLanguage;
		}

		public String getHobbiesAndInterests()
		{
			return hobbiesAndInterests;
		}

		public void setHobbiesAndInterests(String hobbiesAndInterests)
		{
			this.hobbiesAndInterests = hobbiesAndInterests;
		}

		public String getLanguage()
		{
			return language;
		}

		public void setLanguage(String language)
		{
			this.language = language;
		}

		public void fillUpMyProfile(String p_gender)
		{
			// Main info:
			birthDay = "25";
			birthMonth = "5";
			birthYear = "1984";
			age = calcAge(Integer.valueOf(birthDay), Integer.valueOf(birthMonth), Integer.valueOf(birthYear));
			location = "Glasgow, G1 1DA";
			description = "NEW: there is something Description ;)";
			about = "NEW: there is something About me ;)";

			// Personal info:
			height = "Rather not say";
			weight = "Rather not say";
			bodyType = "Athletic";
			hairColor = "White";
			eyesColor = "Grey";
			pircing = "Yes";
			tattoo = "Yes";
			orientation = "Bisexual";
			maritalStatus = "In a relationship";
			children = "I have children";
			living = "I live with family";
			income = "Well paid";
			smoke = "Yes, socially";
			drink = "Yes, regularly";
			ethnicOrigin = "Asian";
			religion = "Muslim";
			education = "No degree";
		}

		public void fillUpMyProfileApp()
		{
			height = "4\' 5\" (1.35m)";
			bodyType = "Athletic";
			orientation = "Bisexual";
			maritalStatus = "Single";
			smoke = "Rather not say";
			drink = "No";
			children = "I have children";
		}

		public void fillUpMyProfileDate(String p_day, String p_month, String p_year)
		{
			// Main info:
			birthDay = p_day;
			birthMonth = p_month;
			birthYear = p_year;
			age = calcAge(Integer.valueOf(birthDay), Integer.valueOf(birthMonth), Integer.valueOf(birthYear));
			location = "Glasgow, G1 1DA";
			description = "NEW: there is something Description ;)";
			about = "NEW: there is something About me ;)";

			// Personal info:
			height = "Rather not say";
			weight = "Rather not say";
			bodyType = "Athletic";
			hairColor = "White";
			eyesColor = "Grey";
			pircing = "Yes";
			tattoo = "Yes";
			orientation = "Bisexual";
			maritalStatus = "In a relationship";
			children = "I have children";
			living = "I live with family";
			income = "Well paid";
			smoke = "Yes, socially";
			drink = "Yes, regularly";
			ethnicOrigin = "Asian";
			religion = "Muslim";
			education = "No degree";
		}

		public void fillUpMyProfileMobile()
		{
			orientation = "Straight";
			language = "English";
			maritalStatus = "Single";
			children = "I want children";
			living = "I live alone";
			ethnicOrigin = "Asian";
			religion = "Atheist";
			height = "5\' 10\" (1.78m)";
			weight = "15st 12lb - 101kg";
			hairColor = "Other";
			eyesColor = "Hazel";
			bodyType = "Athletic";
			tattoo = "Yes";
			pircing = "Yes";
			smoke = "Yes, regularly";
			drink = "Yes, regularly";
			education = "High school";
			income = "Well paid";
			setAge(20, 02, 1984);
		}

		public void setAge(int p_day, int p_month, int p_year)
		{
			String textMonth = cronos().getMonthByInt(p_month);
			Integer numberOfYears = cronos().getDiffYears(p_year, p_month, p_day);
			age = String.valueOf(numberOfYears);
			birthDay = Integer.toString(p_day);
			birthMonth = textMonth;
			birthYear = Integer.toString(p_year);

			log().info("myAge = " + age);
		}
	}

	public class PaymentDetails
	{
		public String cardNumber;
		public String cardName;
		public String expireDateMonth;
		public String expireDateYear;
		public String securityNumber;
		public String firstName;
		public String lastName;
		public String billingAddress;
		public String city;
		public String postcode;
		public String country;

		public void fillUpCorrectCard()
		{
			cardNumber = "4012888888881881";
			cardName = "Mark Shelton";
			expireDateMonth = "10";
			expireDateYear = "2016";
			securityNumber = "521";
			firstName = "Mark";
			lastName = "Shelton";
			billingAddress = "address";
			city = "city";
			postcode = "postcode";
			country = "";
		}

		public void fillUpIncorrectCard()
		{
			cardNumber = "4012888888881881";
			cardName = "Mark Shelton";
			expireDateMonth = "12";
			expireDateYear = "2016";
			securityNumber = "521";
			firstName = "Mark";
			lastName = "Shelton";
			billingAddress = "address";
			city = "city";
			postcode = "postcode";
			country = "";
		}
	}

	public class AboutMe
	{
		public String height;
		public String weight;
		public String maritalStatus;
		public String nativeLanguage;
		public String secondLanguage;
		public String hobbiesAndInterests;
		public String description;

		public void fillUpAboutMe()
		{
			height = "6' 1\" (1.85m)";
			weight = "13st 7lb - 86kg";
			maritalStatus = "Single";
			nativeLanguage = "English";
			secondLanguage = "Ukrainian";
			hobbiesAndInterests = "Daving, sailing";
			description = "Funnel status will be here ;)";
		}
	}

	public String calcAge(int p_day, int p_month, int p_year)
	{
		Integer numberOfYears = cronos().getDiffYears(p_year, p_month, p_day);
		return String.valueOf(numberOfYears);
	}

	public String getNameOfValues(String p_month)
	{
		String m = "";
		switch (p_month)
		{
			case "1":
			{
				m = "Jan";
				break;
			}
			case "2":
			{
				m = "Feb";
				break;
			}
			case "3":
			{
				m = "Mar";
				break;
			}
			case "4":
			{
				m = "Apr";
				break;
			}
			case "5":
			{
				m = "May";
				break;
			}
			case "6":
			{
				m = "June";
				break;
			}
			case "7":
			{
				m = "July";
				break;
			}
			case "8":
			{
				m = "Aug";
				break;
			}
			case "9":
			{
				m = "Sep";
				break;
			}
			case "10":
			{
				m = "Oct";
				break;
			}
			case "11":
			{
				m = "Nov";
				break;
			}
			case "12":
			{
				m = "Dec";
				break;
			}
		}

		return m;
	}

	public String getValuesOfName(String p_month)
	{
		String m = "";
		switch (p_month)
		{
			case "January":
			{
				m = "1";
				break;
			}
			case "February":
			{
				m = "2";
				break;
			}
			case "March":
			{
				m = "3";
				break;
			}
			case "April":
			{
				m = "4";
				break;
			}
			case "May":
			{
				m = "5";
				break;
			}
			case "June":
			{
				m = "6";
				break;
			}
			case "July":
			{
				m = "7";
				break;
			}
			case "August":
			{
				m = "8";
				break;
			}
			case "September":
			{
				m = "9";
				break;
			}
			case "October":
			{
				m = "10";
				break;
			}
			case "November":
			{
				m = "11";
				break;
			}
			case "December":
			{
				m = "12";
				break;
			}
		}

		return m;
	}
}